/*
 * 舆情文章API
 *
 * @Author:    1024创新实验室-主任：卓大
 * @Date:      2025-01-15 10:00:00
 * @Wechat:    zhuda1024
 * @Email:     lab1024@163.com
 * @Copyright  1024创新实验室 （ https://1024lab.net ），Since 2012
 */
import { getRequest, postRequest, request } from '/@/lib/axios';

export const newsArticleApi = {
  // 分页查询舆情文章 @author 卓大
  queryPage: (param) => {
    return postRequest('/yuqing/article/query', param);
  },
  
  // 获取文章详情 @author 卓大
  getDetail: (articleId) => {
    return getRequest(`/yuqing/article/detail/${articleId}`);
  },
  
  // 删除文章 @author 卓大
  delete: (articleId) => {
    return request({
      url: `/yuqing/article/delete/${articleId}`,
      method: 'delete'
    });
  },
  
  // 批量删除文章 @author 卓大
  batchDelete: (articleIds) => {
    return postRequest('/yuqing/article/batchDelete', articleIds);
  },
  
  // 导出文章数据 @author 卓大
  export: (param) => {
    return request({
      url: '/yuqing/article/export',
      method: 'post',
      data: param,
      responseType: 'blob'
    });
  }
}; 